#pragma once
#include <common/RefCounter.h>
#include "Direction.h"

namespace catan
{
	struct BuildPointEdgeDirection
	{
		enum Enum
		{
			Start = 0,
			Up = 0,
			DownRight,
			DownLeft,
			Num,
		};
	};
	class BuildPoint : public BoardItem
	{
	public:
		BuildPoint(void);
		void AddField(Handle<Field> field);
		void AddEdge(Handle<Edge> edge);
		void SetPort(Handle<Port> port) {mPort = port;}
		void SetBuilding(Handle<Building> val) { mBuilding = val; }

		bool HasBuilding() { return mBuilding; }
		~BuildPoint(void);

	protected:
		
	public:
		Edges mEdges;
		std::map<BuildPointDirection::Enum, Handle<Field>> mFields;
		Handle<Port> mPort;
		Handle<Building> mBuilding;

		template<class Serializer>
		void serialize(Serializer & s, const unsigned int version)
		{
			s & mEdges & mFields & mPort & mBuilding;
		}
	};
}	